<?php require_once 'filter.php';?>
<div style="margin-left: 170px;">
	<div id="compare-title">
		<?php echo lang('compare_page_title')?>
	</div>
	<div id="compare-content">
		<div id="email-container">
			<label id="email_page_text"><?php echo lang('email_this_page')?></label>&nbsp;
				<input type="text" name="email" id="email" value="<?php echo lang('email_contact');?>" />&nbsp;
				<input type="text" name="name" id="name" value="<?php echo lang('your_name');?>" />&nbsp;
			<div id="send"><?php echo lang('send')?></div>
		</div>
		<?php if(count($products)){?>
		<div class="compare-column-head">
			<div class="cell compare-image-container"></div>
			<div class="cell"><?php echo lang('compare_rating')?></div>
			<div class="cell"><?php echo lang('compare_item_ref')?></div>
			<div class="cell" style="height:65px;"><?php echo lang('compare_product')?></div>
			<div class="cell"><?php echo lang('compare_metal')?></div>
			<div class="cell"><?php echo lang('compare_child_prods')?></div>
			<div class="cell"><?php echo lang('compare_diamond_weight')?></div>
			<div class="cell"><?php echo lang('compare_diamond_quality')?></div>
			<div class="cell"><?php echo lang('compare_settings')?></div>
			<div class="cell"><?php echo lang('compare_stone_shape')?></div>
			<div class="cell"><?php echo lang('compare_gem_size')?></div>
			<div class="cell"><?php echo lang('compare_dimensions')?></div>
			<div class="cell"><?php echo lang('compare_measurments')?></div>
			<div class="cell"><?php echo lang('compare_certificates')?></div>
			<div class="cell"><?php echo lang('compare_rrp')?></div>
			<div class="cell our-price"><?php echo lang('compare_our_price')?></div>
			<div class="cell buttons-container"></div>
		</div>
		<input type="hidden" id="number_of_items" value="<?php echo count($products);?>" />
		<?php foreach($products as $key=>$product){?>
			<div class="compare-column" id="<?php echo $product->id?>">
				<div class="cell compare-image-container">
					<a href="<?php echo get_product_url($product->name,$product->id)?>">
						<?php echo "<img src='" . SMALL_IMAGE_URL . $product->url . "' />";?>
					</a>
				</div>
				<div class="cell">
					<input type="hidden" name="rating_<?php echo $key+1; ?>" id="rating_<?php echo $key+1; ?>" value="<?php echo $product->rating; ?>"/>
					<div class="compare-star" id="star_<?php echo $key+1; ?>"></div>
				</div>
				<div class="cell"><?php echo $product->sku; ?></div>
				<div class="cell" style="height:65px;overflow:hidden;"><?php echo $product->name; ?></div>
				<div class="cell"><?php echo $product->metal; ?></div>
				<div class="cell">
				<?php if (!empty($product->childs)){?>
					<select class="child-container">
					<option value="" selected="selected"><?php echo lang('choose_one_text')?></option>
					<?php foreach($product->childs as $child){?>
						<option value="<?php echo $child->id?>"><?php echo $child->sku?></option>
						<?php }?>
					</select>
					<?php }
				?>
				</div>
				<div style="text-align:center;"></div>
			</div>
		<?php }?>
		<div class="clear"></div>
		<div>
			<div class="remove-btn back" onclick="javascript:window.location =' <?php echo $backString ?>'" style="float:left"><?php echo lang('back')?></div>
			<div class="clear"></div>
		</div>
		<?php } else {?>
		<div>
			<?php echo lang('compare_page_no_items')?>
		</div>
		<?php }?>
	</div>
	<form id="add-to-cart-form" method="post" style="display:none">
		<input type="hidden" id="add-to-cart-size" name="ring_size" value="" />
	</form>
</div>